package com.hou.serviceuserfeign.feign;


import com.hou.MyFeignConfigurationUrl;
import com.hou.serviceuserfeign.po.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 使用URl方式直接调用服务,name必须写
 */
@FeignClient(name = "user",url ="http://localhost:8083",configuration = MyFeignConfigurationUrl.class)
public interface OrderFeignClientByUrl {


    @GetMapping("/order")
    Order getOrder(@RequestParam("id") String id);

    @GetMapping("/name")
    String getOrderName();
}
